Skip to content

docs(rfc): multi-node devbox with GPU/RDMA-capable AppEnvironments - #8218

Open
cosmicbboy wants to merge 1 commit into
flyteorg:masterfrom
cosmicbboy:docs/devbox-dual-dgx-gpu-rfc
Open

cosmicbboy wants to merge 1 commit into
flyteorg:masterfrom
cosmicbboy:docs/devbox-dual-dgx-gpu-rfc

Conversation

@cosmicbboy

@cosmicbboy cosmicbboy commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why are the changes needed?

Flyte's devbox is architecturally a single-node k3s cluster, and the app-serving path
cannot hand an AppEnvironment a usable GPU today:

  1. The devbox cannot span two physical machines (no agent/join path), so a 2-node DGX Spark
    pair is invisible to it.
  2. app/internal/k8s/app_client.go::protoResourceName maps only CPU/MEMORY/STORAGE/
    EPHEMERAL_STORAGE to k8s resources — Resources_GPU is silently dropped, so an
    AppEnvironment's gpu= never becomes nvidia.com/gpu on the Knative pod.
  3. Because pods never request a GPU, the (default nvidia) containerd runtime stays in
    "passthrough when no GPU is requested" mode: pods see the driver interface
    (/proc/driver/nvidia/gpus) but no /dev/nvidia*, no CUDA, and never /dev/infiniband —
    so cross-node NCCL/RoCE workloads cannot run from an app pod.

This is a design spec (no code change) for making devbox able to span two DGX Sparks and
give GPU/RDMA-capable AppEnvironments, motivated by hosting a TP=2 vLLM DeepSeek service in
Flyte instead of a systemd + docker-compose stack.

What changes were proposed in this pull request?

Adds rfc/system/20261022-devbox-dual-dgx-gpu.md, an RFC-style spec containing:

  • A verified baseline — evidence from a live test on a dual DGX Spark pair (single node,
    nvidia.com/gpu: 1, AppEnvironment GPU request dropped to {cpu,memory}, pod sees node-1
    GB10 driver UUID but no device nodes / Inferfaband).
  • A layered change plan, file-precise:
    • Layer A — multi-node devbox (flyte-sdk CLI agent/join + devbox-bundled entrypoint +
      registry reachability from node 2).
    • Layer B — GPU devices actually injected once requested (CDI fallback).
    • Layer C — backend fix: map Resources_GPU → nvidia.com/gpu, call the task path's
      flytek8s.SanitizeGPUResourceRequirements / ApplyGPUNodeSelectors, apply
      ExtendedResources.SharedMemory to a /dev/shm volume, and auto-label nodes.
    • Layer D — RDMA (/dev/infiniband), host network, memlock/NCCL-channel notes.
    • Layer E — multi-host TP=2 serving pattern (two pinned rank apps today; first-class
      multi-rank app later).
    • Layer F — shared weight storage on both nodes.
  • A minimal-change path (pod-template apps bypass protoResourceName), acceptance
    criteria
    , risks/open questions, and a change inventory table.

How was this patch tested?

Documentation only (RFC). The evidence in §2 was gathered live on the dual DGX Spark pair:
the devbox was started with --gpu, a GPU-probe AppEnvironment was deployed and inspected
via kubectl exec (pod resources, /dev, /proc/driver/nvidia), and the devbox was torn
down afterwards with the production DeepSeek V4 service untouched.

  • I updated the documentation accordingly.
  • All new and existing tests passed. (docs-only; no code touched)
  • All commits are signed-off.

Docs link

rfc/system/20261022-devbox-dual-dgx-gpu.md

@github-actions

Copy link
Copy Markdown

This PR was flagged by our automated quality checks. If you're a genuine
contributor, please reply here and a maintainer will review your PR.

We appreciate your contribution and apologize if this is a false positive!

RFC-style spec (rfc/system) proposing:
- multi-node devbox: node 2 joins as a k3s agent over the RoCE fabric
- AppEnvironment GPU plumbing: map Resources_GPU to nvidia.com/gpu
  (protoResourceName currently drops it), reuse flytek8s GPU/shared-memory
  helpers on the app path, auto-label GB10 nodes
- RDMA (/dev/infiniband), host-network and memlock/NCCL notes, multi-host
  TP=2 serving pattern, shared weight storage
- live-verified baseline evidence on a dual DGX Spark pair + minimal-change
  path (PodTemplate apps work today)

Signed-off-by: Niels Bantilan <cosmicBboy@users.noreply.github.com>
@cosmicbboy
cosmicbboy force-pushed the docs/devbox-dual-dgx-gpu-rfc branch from cc753e1 to 71bc806 Compare October 22, 2026 06:34
@cosmicbboy cosmicbboy changed the title docs(rfcs): spec for multi-node devbox with GPU/RDMA-capable AppEnvironments docs(rfc): multi-node devbox with GPU/RDMA-capable AppEnvironments Oct 22, 2026
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.34%. Comparing base (2682923) to head (71bc806).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8218      +/-   ##
==========================================
+ Coverage   56.56%   57.34%   +0.78%     
==========================================
  Files         772      931     +159     
  Lines       52305    58336    +6031     
==========================================
+ Hits        29587    33454    +3867     
- Misses      19961    21831    +1870     
- Partials     2757     3051     +294     
Flag Coverage Δ
unittests-datacatalog 53.62% <ø> (ø)
unittests-flyteadmin 53.26% <ø> (ø)
unittests-flytecopilot 48.05% <ø> (ø)
unittests-flytectl 64.11% <ø> (?)
unittests-flyteidl 76.63% <ø> (ø)
unittests-flyteplugins 60.64% <ø> (ø)
unittests-flytepropeller 53.88% <ø> (ø)
unittests-flytestdlib 64.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Sovietaced

Copy link
Copy Markdown
Member

@cosmicbboy I think you have the wrong target branch

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants